#include "Interface/BeamSectionNumericalCalculatorFactory.h"
#include <iostream>
#include <assert.h>
#include "../Common/BeamSecPropCalculatorInfo.h"
// #include "RodSectionNumericalCalculator.h"
#include "BarSectionNumericalCalculator.h"
// #include "TubeSectionNumericalCalculator.h"
// #include "Tube2SectionNumericalCalculator.h"
#include "BoxSectionNumericalCalculator.h"
#include "Box1SectionNumericalCalculator.h"
#include "ISectionNumericalCalculator.h"
#include "I1SectionNumericalCalculator.h"
#include "HSectionNumericalCalculator.h"
#include "LSectionNumericalCalculator.h"
#include "ChanSectionNumericalCalculator.h"
#include "Chan1SectionNumericalCalculator.h"
#include "Chan2SectionNumericalCalculator.h"
#include "TSectionNumericalCalculator.h"
#include "T1SectionNumericalCalculator.h"
#include "T2SectionNumericalCalculator.h"
#include "CrossSectionNumericalCalculator.h"
#include "ZSectionNumericalCalculator.h"
// #include "HexaSectionNumericalCalculator.h"
#include "HatSectionNumericalCalculator.h"
// #include "Hat1SectionNumericalCalculator.h"

using SG::DataStructure::FEM::BeamSectionStandardTypes;
using namespace SG::FEMSolver::Element;

BeamSectionNumericalCalculatorSP BeamSectionNumericalCalculatorFactory::Create (BeamSectionStandardTypes type)
{
    switch (type)
    {
        // case BeamSectionStandardTypes::BEAMSECTYPE_ROD:
        // {
        //     return std::make_shared<RodSectionNumericalCalculator> ();
        //     break;
        // }
        case BeamSectionStandardTypes::BEAMSECTYPE_BAR:
        {
            return std::make_shared<BarSectionNumericalCalculator> ();
            break;
        }
        //  case BeamSectionStandardTypes::BEAMSECTYPE_TUBE:
        // {
        //     return std::make_shared<TubeSectionNumericalCalculator> ();
        //     break;
        // }
        // case BeamSectionStandardTypes::BEAMSECTYPE_TUBE2:
        // {
        //     return std::make_shared<Tube2SectionNumericalCalculator> ();
        //     break;
        // }
        case BeamSectionStandardTypes::BEAMSECTYPE_BOX:
        {
            return std::make_shared<BoxSectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_BOX1:
        {
            return std::make_shared<Box1SectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_I:
        {
            return std::make_shared<ISectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_I1:
        {
            return std::make_shared<I1SectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_H:
        {
            return std::make_shared<HSectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_L:
        {
            return std::make_shared<LSectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_CHAN:
        {
            return std::make_shared<ChanSectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_CHAN1:
        {
            return std::make_shared<Chan1SectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_CHAN2:
        {
            return std::make_shared<Chan2SectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_T:
        {
            return std::make_shared<TSectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_T1:
        {
            return std::make_shared<T1SectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_T2:
        {
            return std::make_shared<T2SectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_CROSS:
        {
            return std::make_shared<CrossSectionNumericalCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_Z:
        {
            return std::make_shared<ZSectionNumericalCalculator> ();
            break;
        }
        // case BeamSectionStandardTypes::BEAMSECTYPE_HEXA:
        // {
        //     return std::make_shared<HexaSectionNumericalCalculator> ();
        //     break;
        // }
        case BeamSectionStandardTypes::BEAMSECTYPE_HAT:
        {
            return std::make_shared<HatSectionNumericalCalculator> ();
            break;
        }
        // case BeamSectionStandardTypes::BEAMSECTYPE_HAT1:
        // {
        //     return std::make_shared<Hat1SectionNumericalCalculator> ();
        //     break;
        // }
        default:
            break;
    }

    std::cout << NOT_SUPPORT_SECTOIN_TYPE << static_cast<int> (type) << " \n";
    assert (0);
    return nullptr;
}